package com.dhecp.project.logstics.mapper;

import com.dhecp.project.business.domain.FbaLogsticsOrderDetail;
import com.dhecp.project.common.domain.UpdateFlow;
import com.dhecp.project.logstics.domain.PrintList2;
import com.dhecp.project.storage.domain.HwTailprogram;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

import com.dhecp.core.genericDao.GenericDao;
import com.dhecp.project.logstics.domain.FbaBox;

/**
 * DAO
 * @author Jason
 */
public interface FbaBoxMapper extends GenericDao<FbaBox, String>  {

	/**
     * 查询实体
     * @author Jason
	 */
	List<FbaBox> findFbaBox(Map<String, Object> params);

	/**
     * 查询单个实体
     * @author Jason
	 */
	FbaBox queryFirstByGuid(@Param("guid") String guid);

	/**
     * 查询单个实体
     * @author Jason
	 */
	FbaBox queryByBid(@Param("bid") String bid);

	PrintList2 printListGuid(Map<String, Object> params);

	List<PrintList2> printListBatchGuid(List<FbaBox> fbaBoxList);

	FbaBox queryFirstByShipmentId(@Param("shipmentId") String shipmentId);

	/**
	 * 新增实体
     * @author Jason
	 */
	int insertFbaBox(FbaBox entity);
	
	/**
	 * 通过guid修改实体
     * @author Jason
	 */
	int updateByGuid(FbaBox entity);

	/**
	 * 批量修改实体
	 * @param entity
	 * @return
	 */
	int updateBatchGuid(List<FbaBox> entity);


	int updateBatchCode(List<FbaBox> entity);


	/**
	 *@Description: 修改流程状态及生效标志（仅需 guid、activeFlow、effectStock、updateTime）
	 *@Param: [updateFlow]
	 *@return: int
	 *@Author: hlf
	 *@date: 2022-05-09 10:13
	 */
	int updateFlow(UpdateFlow updateFlow);

	int update(UpdateFlow updateFlow);

	/**
	 * 根据code 删除发货单
	 * @param fbaBox
	 * @return
	 */
	int deleteCodeShipment(FbaBox fbaBox);

	/**
	 * 根据fba批量查询实体
	 * @author fxz
	 */
	List<FbaBox> findFbaBoxShipment(List<FbaBox> fbaBoxList);


	List<FbaBox> findFbaBoxBatch(List<FbaBox> fbaBoxList);


	List<FbaBox> findFbaBoxBatch1(List<FbaLogsticsOrderDetail> fbaLogsticsOrderDetailList);

	/**
	 * 清光方式是否是自税
	 */
	int countByGuid(List<FbaBox> entity);

	List<FbaBox> findFbaBoxHwBatch(List<HwTailprogram> hwTailprogramList);

}
